# movtest4.S - An example of indirect addressing
.section .data
values:
	.int 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
.section .text
.globl _start
_start:
	movl values, %eax             # Move the value in values, i.e. 10, to register EAX
	movl $values, %edi            # Move the addr of values to register EDI
	movl $100, 4(%edi)            # Replave the value in %edi + 4, i.e. 15, with 100
	movl $1, %edi                 #
	movl values(, %edi, 4), %ebx  # Move the value in values + %edi * 4, i.e. 100, to register EBX
	movl $1, %eax                 # System call 1, exit
	int  $0x80
